package org.example.pet.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.extern.slf4j.Slf4j;
import org.example.pet.dto.PetInfoResponseDTO;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@Slf4j
@SpringBootTest
public class PetServiceTest {
    @Autowired
    private PetService petService;

    @Test
    public void petPageQuery() {
        int page = 2;
        int pageSize = 2;
        Page<PetInfoResponseDTO> pageRes = petService.page(page, pageSize);
        for (PetInfoResponseDTO pet : pageRes.getRecords()) {
            log.info("查询到的宠物：{}", pet);
        }

    }
}
